﻿#region Using Statements
using System;
#endregion

namespace DirectZZT.Shared.World
{
    /// <summary>
    /// Represents errors that occur when a feature is not available in the current feature set.
    /// </summary>
    public sealed class FeatureException : Exception
    {
        #region Properties

        /// <summary>
        /// Gets the feature set that was in use.
        /// </summary>
        public FeatureSet FeatureSet { get; private set; }
        /// <summary>
        /// Gets the affected feature.
        /// </summary>
        public Feature Feature { get; private set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the FeatureException class.
        /// </summary>
        private FeatureException()
            : base()
        {

        }

        /// <summary>
        /// Initializes a new instance of the FeatureException class.
        /// </summary>
        /// <param name="featureSet">The feature set that was in use.</param>
        /// <param name="feature">The affected feature.</param>
        public FeatureException(FeatureSet featureSet, Feature feature)
            : this()
        {
            this.FeatureSet = featureSet;
            this.Feature = feature;
        }


        #endregion
    }
}
